package com.huiyi.shopping_order.service.impl;

import java.util.List;

import com.huiyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.huiyi.shopping_order.mapper.ShoppingOrderMapper;
import com.huiyi.shopping_order.domain.ShoppingOrder;
import com.huiyi.shopping_order.service.IShoppingOrderService;

/**
 * 购物订单Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-28
 */
@Service
public class ShoppingOrderServiceImpl implements IShoppingOrderService 
{
    @Autowired
    private ShoppingOrderMapper shoppingOrderMapper;

    /**
     * 查询购物订单
     * 
     * @param id 购物订单主键
     * @return 购物订单
     */
    @Override
    public ShoppingOrder selectShoppingOrderById(Long id)
    {
        return shoppingOrderMapper.selectShoppingOrderById(id);
    }

    /**
     * 查询购物订单列表
     * 
     * @param shoppingOrder 购物订单
     * @return 购物订单
     */
    @Override
    public List<ShoppingOrder> selectShoppingOrderList(ShoppingOrder shoppingOrder)
    {
        return shoppingOrderMapper.selectShoppingOrderList(shoppingOrder);
    }

    /**
     * 新增购物订单
     * 
     * @param shoppingOrder 购物订单
     * @return 结果
     */
    @Override
    public int insertShoppingOrder(ShoppingOrder shoppingOrder)
    {
        return shoppingOrderMapper.insertShoppingOrder(shoppingOrder);
    }

    /**
     * 修改购物订单
     * 
     * @param shoppingOrder 购物订单
     * @return 结果
     */
    @Override
    public int updateShoppingOrder(ShoppingOrder shoppingOrder)
    {
        return shoppingOrderMapper.updateShoppingOrder(shoppingOrder);
    }

    /**
     * 批量删除购物订单
     * 
     * @param ids 需要删除的购物订单主键
     * @return 结果
     */
    @Override
    public int deleteShoppingOrderByIds(Long[] ids)
    {
        return shoppingOrderMapper.deleteShoppingOrderByIds(ids);
    }

    /**
     * 删除购物订单信息
     * 
     * @param id 购物订单主键
     * @return 结果
     */
    @Override
    public int deleteShoppingOrderById(Long id)
    {
        return shoppingOrderMapper.deleteShoppingOrderById(id);
    }
}
